#define EnterQt //A switch to enable the Qt stuff
#define ObjectiveCPP //Enable the Objective-C++ hack stuff
#define QGUIfy //Tweaks to enable Qt GUI mode
//#define EnableDumbIterator

#include <stdio.h>
#include <iostream>
#include <QtCore/QCoreApplication>
#include <QTextStream>
#ifdef QGUIfy
#include <QtGui/QApplication>
#include <QtGui/QLabel>
#endif

#ifdef ObjectiveCPP
//Objective-C headers
#import <objc/objc.h>
#import <Foundation/Foundation.h>
#import <Foundation/NSString.h>
#import <Foundation/NSObject.h>
#import <objc/Object.h>
#import <Cocoa/Cocoa.h>

#endif

int main(int argc, char *argv[])
{
#ifdef QGUIfy
    QApplication a(argc, argv);
#else
    QCoreApplication a(argc, argv);
#endif

    printf("Hello, World! from C\n");
    std::cerr << "Hello, World! from C++!" << std::endl;

//Enter the world of Qt strings
    QString HelloQt = "Hello, World! from Qt (QTextStream)!\n"; //Create our QString
    QTextStream out(stdout); //Prepare stdout with QStreamOut
    out << HelloQt; //Try to dump out HelloQt to the console
//Leave the world of Qt strings

//A Qt Label
#ifdef QGUIfy
    QLabel label("Hello, World! from Qt (QLabel)");
    label.show();
#endif
//Finish our Qt Label


//`A Cocoa/Objective-C string
//int ObjCBridge(void){
@interface ObjectiveC : NSObject
- (void) ObjCString;
//+ObjCString;
@end

@implementation ObjectiveC
- (void) ObjCString {
    NSLog(@"Hello, World! from Objective-C! (NSLog)";
  //NSString * ObjectiveCString = @"Hello, World! from Objective-C";
}
@end
//}
//std::cout << ObjectiveCString << endl;
ObjectiveC *ObjC [[ObjectiveC alloc] init];
[ObjectiveC ObjCString];
[ObjectiveC release];
}
//End of Objective-C string


#ifdef EnableDumbIterator /* We don't need the endless loop generated by default,
                               so we disable it with this ugly #ifndef*/
    return a.exec();
#endif
sync(); //Flush stuff to disk - slows us down somewhat :(
}

